import { NextResponse } from "next/server";

export function middleware() {
    const resp = NextResponse.next()
    resp.headers.append('Access-Control-Allow-Credentials', "true");
    resp.headers.append('Access-Control-Allow-Origin', '*');
    resp.headers.append('Access-Control-Allow-Methods', 'GET,DELETE,PATCH,POST,PUT');
    resp.headers.append('Access-Control-Allow-Headers', '*');
    return resp
}

export const config = { matcher: '/api/:path*' };
